From 479f9c8a5d0a0d61efed553218febbea3a82162c Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Thu, 1 Feb 2007 15:03:37 +0000 Subject: [PATCH] [PYGRUB] Invoke pygrub with TERM=vt100 Signed-off-by: Tim Deegan --- tools/pygrub/src/pygrub | 5 ++++- tools/python/xen/xend/XendBootloader.py | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub index cf0efcb185..9b3d15f675 100644 --- a/tools/pygrub/src/pygrub +++ b/tools/pygrub/src/pygrub @@ -197,7 +197,10 @@ class Grub: self.screen = curses.initscr() self.screen.timeout(1000) if hasattr(curses, 'use_default_colors'): - curses.use_default_colors() + try: + curses.use_default_colors() + except: + pass # Not important if we can't use colour enable_cursor(False) self.entry_win = curses.newwin(10, 74, 2, 1) self.text_win = curses.newwin(10, 70, 12, 5) diff --git a/tools/python/xen/xend/XendBootloader.py b/tools/python/xen/xend/XendBootloader.py index 29644c5004..4220cde6eb 100644 --- a/tools/python/xen/xend/XendBootloader.py +++ b/tools/python/xen/xend/XendBootloader.py @@ -97,7 +97,9 @@ def bootloader(blexec, disk, dom, quiet = False, blargs = '', kernel = '', try: log.debug("Launching bootloader as %s." % str(args)) - os.execvp(args[0], args) + env = os.environ.copy() + env['TERM'] = 'vt100' + os.execvpe(args[0], args, env) except OSError, e: print e pass -- 2.30.2